class Solution {
    public void moveZeroes(int[] nums) {
        int n=nums.length;
        int dest=0;
        for(int cur=0;cur<n;cur++){
            if(nums[cur]!=0){
                int tmp = nums[cur];
                nums[cur] = nums[dest];
                nums[dest] = tmp;
                dest++;
            }
        }
    }
}